using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsDesktopTools._Utilities._BigDataConnections
{
    /// <summary>
    /// <para>Create Big Data Connection</para>
    /// <para>Creates a big data connection file (.bdc) and item. Datasets registered in a big data connection (BDC) can be used as input to GeoAnalytics Desktop tools and other geoprocessing tools.</para>
    /// <para>创建大数据连接文件 （.bdc） 和项。在大数据连接 （BDC） 中注册的数据集可用作 GeoAnalytics Desktop 工具和其他地理处理工具的输入。</para>
    /// </summary>    
    [DisplayName("Create Big Data Connection")]
    public class CreateBDC : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateBDC()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_bdc_location">
        /// <para>Big Data Connection Output Location</para>
        /// <para>The folder where the .bdc file will be created.</para>
        /// <para>将在其中创建 .bdc 文件的文件夹。</para>
        /// </param>
        /// <param name="_bdc_name">
        /// <para>Output Big Data Connection Name</para>
        /// <para>The name of the .bdc file to be created.</para>
        /// <para>要创建的 .bdc 文件的名称。</para>
        /// </param>
        /// <param name="_connection_type">
        /// <para>Connection Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of connection to be created.</para>
        ///   <bulletList>
        ///     <bullet_item>Folder—Connect to a file system location. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要创建的连接类型。</para>
        ///   <bulletList>
        ///     <bullet_item>文件夹 - 连接到文件系统位置。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateBDC(object _bdc_location, object _bdc_name, _connection_type_value _connection_type)
        {
            this._bdc_location = _bdc_location;
            this._bdc_name = _bdc_name;
            this._connection_type = _connection_type;
        }
        public override string ToolboxName => "GeoAnalytics Desktop Tools";

        public override string ToolName => "Create Big Data Connection";

        public override string CallName => "gapro.CreateBDC";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_bdc_location, _bdc_name, _connection_type.GetGPValue(), _data_source_folder, _visible_geometry.GetGPValue(), _visible_time.GetGPValue(), _output_bdc];

        /// <summary>
        /// <para>Big Data Connection Output Location</para>
        /// <para>The folder where the .bdc file will be created.</para>
        /// <para>将在其中创建 .bdc 文件的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Big Data Connection Output Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _bdc_location { get; set; }


        /// <summary>
        /// <para>Output Big Data Connection Name</para>
        /// <para>The name of the .bdc file to be created.</para>
        /// <para>要创建的 .bdc 文件的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Big Data Connection Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _bdc_name { get; set; }


        /// <summary>
        /// <para>Connection Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of connection to be created.</para>
        ///   <bulletList>
        ///     <bullet_item>Folder—Connect to a file system location. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要创建的连接类型。</para>
        ///   <bulletList>
        ///     <bullet_item>文件夹 - 连接到文件系统位置。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Connection Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _connection_type_value _connection_type { get; set; }

        public enum _connection_type_value
        {
            /// <summary>
            /// <para>Folder</para>
            /// <para>Folder—Connect to a file system location. This is the default.</para>
            /// <para>文件夹 - 连接到文件系统位置。这是默认设置。</para>
            /// </summary>
            [Description("Folder")]
            [GPEnumValue("FOLDER")]
            _FOLDER,

        }

        /// <summary>
        /// <para>Data Source Folder</para>
        /// <para>The folder containing the datasets to be registered with the BDC.</para>
        /// <para>包含要注册到 BDC 的数据集的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Source Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _data_source_folder { get; set; } = null;


        /// <summary>
        /// <para>Visible Geometry Fields</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the fields used to specify the geometry will be visible as fields when the BDC file is used as input to other geoprocessing tools. When the geometry fields are not visible, geometry is still applied to the dataset. The geometry visibility setting can be modified in the BDC.
        ///   <bulletList>
        ///     <bullet_item>Checked—Geometry fields will be included as fields for analysis. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Geometry fields will not be included as fields for analysis.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定当 BDC 文件用作其他地理处理工具的输入时，用于指定几何的字段是否显示为字段。当几何字段不可见时，几何仍应用于数据集。可以在 BDC 中修改几何可见性设置。
        ///   <bulletList>
        ///     <bullet_item>选中 - 几何字段将作为分析字段包括在内。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 几何字段将不作为分析字段包括在内。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Visible Geometry Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _visible_geometry_value _visible_geometry { get; set; } = _visible_geometry_value._true;

        public enum _visible_geometry_value
        {
            /// <summary>
            /// <para>GEOMETRY_VISIBLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GEOMETRY_VISIBLE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>GEOMETRY_NOT_VISIBLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GEOMETRY_NOT_VISIBLE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Visible Time Fields</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the fields used to specify the time will be visible as fields when the BDC file is used as input to other geoprocessing tools. When the time fields are not visible, time is still applied to the dataset. The time visibility setting can be modified in the BDC.
        ///   <bulletList>
        ///     <bullet_item>Checked—Time fields will be included as fields for analysis. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Time fields will not be included as fields for analysis.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定当 BDC 文件用作其他地理处理工具的输入时，用于指定时间的字段是否显示为字段。当时间字段不可见时，时间仍应用于数据集。可以在 BDC 中修改时间可见性设置。
        ///   <bulletList>
        ///     <bullet_item>选中 - 时间字段将作为分析字段包括在内。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 时间字段将不作为分析字段包括在内。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Visible Time Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _visible_time_value _visible_time { get; set; } = _visible_time_value._true;

        public enum _visible_time_value
        {
            /// <summary>
            /// <para>TIME_VISIBLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TIME_VISIBLE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>TIME_NOT_VISIBLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TIME_NOT_VISIBLE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output BDC</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output BDC")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_bdc { get; set; }


        public CreateBDC SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}